package com.gh.blog.controller;

import com.gh.blog.entity.Category;
import com.gh.blog.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author Fawn
 * @Date 2020/9/11 11:07
 * @Version 1.0
 **/
@RestController
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    @GetMapping("findAllCategory")
    public List findAllCategory(){
        List<Category> category = categoryService.findAllCategory();
        return category;
    }
}
